public class StaticProxyExample {

	// 原接口
	interface Hello {
		void sayHi();
	}

	// 接口实现类
	static class HelloImpl implements Hello {
		public void sayHi() {
			System.out.println("HelloImpl");
		}
	}

	// 代理类, 实现了接口, 调用 委托类的实现
	static class HelloImplProxy implements Hello {
		private HelloImpl helloImpl = new HelloImpl();
		public void sayHi() {
			System.out.println("logger here");
			helloImpl.sayHi();
		}
	}

	public static void main(String args[]){
		Hello hello = new HelloImplProxy();
		hello.sayHi();
	}
	
}